from django.db import models

# Create your models here.
class User(models.Model):
    name = models.CharField(max_length=50)
    password = models.CharField(max_length=50)
class New(models.Model):
    title = models.CharField(max_length=50)
    new_content = models.CharField(max_length=50)
    img = models.ImageField(upload_to='img')
    new_comment = models.IntegerField(default=0)
    browse = models.IntegerField(default=0)
class Comment(models.Model):
    content = models.CharField(max_length=50)
    user = models.ForeignKey(User,on_delete=models.CASCADE)
    new = models.ForeignKey(New,on_delete=models.CASCADE)






